import { useEffect } from 'react';

const useComponentLoaded = (componentName: string = 'Component') => {
  useEffect(() => {
    console.log(`${componentName} 已加载`);
    
    return () => {
      console.log(`${componentName} 已卸载`);
    };
  }, [componentName]);
};

export default useComponentLoaded;